package com.adrian.controller;

import com.adrian.pojo.User;
import com.adrian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther: Adrian
 * @Date: 2020/3/16 20:14
 * @Description:
 */
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/list")
    public List<User> ListUser(){
        List<User> user = userService.queryUsers();
        return user;
    }
}
